home *** CD-ROM | disk | FTP | other *** search
- PXFACCESS(3F) Last changed: 1-6-98
-
-
- NNAAMMEE
- PPXXFFAACCCCEESSSS - Checks the accessibility of a named file
-
- SSYYNNOOPPSSIISS
- CCHHAARRAACCTTEERR*_n _p_a_t_h
- IINNTTEEGGEERR _i_l_e_n,, _i_a_m_o_d_e,, _i_e_r_r_o_r
- CCAALLLL PPXXFFAACCCCEESSSS((_p_a_t_h,, _i_l_e_n,, _i_a_m_o_d_e,, _i_e_r_r_o_r))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- 7.2 F77 compiler.
-
- The PPXXFFAACCCCEESSSS subroutine uses the aacccceessss(2) system call to check the
- accessibility of a named file.
-
- The value of _i_a_m_o_d_e indicates specific file permissions. These file
- permissions are checked against the current file permissions specified
- for the file in _p_a_t_h. If the _i_a_m_o_d_e permissions are allowed for the
- file in _p_a_t_h, PPXXFFAACCCCEESSSS returns a zero in _i_e_r_r_o_r. Otherwise, it
- returns a nonzero value.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of valid arguments for this subroutine:
-
- _p_a_t_h An input character variable or array element containing the
- name of a file.
-
- _i_l_e_n An input integer variable containing the length of _p_a_t_h in
- characters. If _i_l_e_n is zero, all trailing blanks are
- removed before calling aacccceessss().
-
- _i_a_m_o_d_e An input integer variable containing the integer value of
- the symbolic constant for one or more of the following
- permissions: RR__OOKK, WW__OOKK, XX__OOKK, or FF__OOKK. An integer value
- for each of these symbolic constants is retrieved through
- the use of PPXXFFCCOONNSSTT or IIPPXXFFCCOONNSSTT. The integer values may be
- combined through the use of a bitwise inclusive OORR function.
-
- _i_e_r_r_o_r An output integer variable that contain zero if the
- requested access is permitted or nonzero if the requested
- access is not permitted.
-
- In addition to the errors returned by the aacccceessss(2) system call,
- PPXXFFAACCCCEESSSS may return the following errors:
-
- EEIINNVVAALL If _i_l_e_n is less than 0 or _i_l_e_n is greater than LLEENN((_p_a_t_h))
-
- EENNOOMMEEMM If PPXXFFAACCCCEESSSS is unable to obtain memory to copy _p_a_t_h.
-
- EEXXAAMMPPLLEESS
- program test
- character*(12) path
- integer ilen, iamod, ierr
- path = 'testfile'
- iamod = 0
- ilen = 0
- ierr = 0
- call pxfconst('R_OK',iamod,ierr)
- if (ierr.ne.0) then
- print *,'FAIL: error from pxfconst R_OK = ',ierr
- else
- print *,'PASS: No error from pxfconst R_OK = '
- endif
- ierr = 0
- call pxfaccess(path,ilen,iamod,ierr)
- if (ierr.ne.0) then
- print *,'FAIL: error from pxfaccess = ',ierr
- else
- print *,'PASS: No error from pxfaccess = '
- endif
- end
-
- SSEEEE AALLSSOO
- aacccceessss(2)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
- 2165, for the printed version of this man page.
-
-